import { getRequest } from "@/api/request";
import { AxiosResponse } from "axios";
const REQUEST_URL = {
  userDeatil: "/user/detail",
  account: "/user/account",
};

export interface INlyricList {
  time: number | string | undefined;
  lyric: string;
}

const handleUserDeatil = (res: AxiosResponse) => {
  return res;
};

export const getUserDeatil = (userId: number | string | undefined) => {
  return getRequest(REQUEST_URL.userDeatil + `?uid=${userId}`).then(
    handleUserDeatil
  );
};

export const getUserAccount = () => {
  return getRequest(REQUEST_URL.account).then();
};
